The SQL Console is Trilium's built-in database editor.
It can be accessed by going to the global menu → Advanced → Open SQL Console.
Hovering the mouse over one of the tables listed at the top of the document will show the columns and their data type.
Only one SQL statement can be run at once.
To run the statement, press the
icon.
For queries that return a result, the data will displayed in a table.
SQL queries or commands can be saved into a dedicated note.
To do so, simply write the query and press the
button. Once saved, the note will appear in Day Notes.